<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="${basePath}/page/AccountSubject_files/appTheme.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/page/AccountSubject_files/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/page/AccountSubject_files/AccountSubject.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/page/AccountSubject_files/select2.min.css" rel="stylesheet" type="text/css">
    <style type="text/css">
        .disableInput {
            background-color: rgb(226, 234, 235);
        }

        #trAssist a:link {
            text-decoration: none;
            color: Blue;
        }

        #trAssist a:visited {
            text-decoration: none;
            color: Gray;
        }

        #trAssist a:hover {
            text-decoration: none;
            cursor: pointer;
        }

        #trAssist a:active {
            text-decoration: none;
        }

        .separator {
            width: 30px;
        }

        #asubCodeControl {
            border: 1px solid rgb(226, 231, 235);
            height: 32px;
            width: 177px;
        }

        #asubCodeControl input {
            height: 30px;
            color: #808080;
            font-size: 14px;
            line-height: 30px;
            border: none;
            padding: 0px;
            outline: none;
        }

        .controlBorder {
            border: 1px solid rgb(91, 196, 92);
        }

        #asubCodeControl span {
            display: block;
            float: left;
            height: 30px;
            line-height: 30px;
            font-size: 14px;
        }

        .datagrid-btable {
            min-width: 958px;
        }

        .tooltip-content .panel-body {
            border: none;
            background-color: #fafafa;
        }

        .tabs-header {
            padding-top: 0px;
        }

        .FlowFirstChild {
            background-color: rgb(242, 242, 242) !important;
        }

        .stamp {
            top: 200px;
            left: 700px;
            position: absolute;
            height: 80px;
            width: 160px;
            background-image: url(${basePath}/page/Image/060Settings/060Settings.png);
            background-position: 0px -40px;
            overflow: hidden;
            background-repeat: no-repeat;
        }

        span.select2.select2-container {
            width: 190px !important;
        }

        #divMEASUREUNIT .jqTransformInputWrapper {
            width: 54px !important;
        }

        #divMEASUREUNIT .jqTransformInputWrapper #txtMEASUREUNIT {
            width: 54px !important;
            margin-left: -5px;
        }

        #divFcContainer input[type='checkbox'] {
            vertical-align: -2px;
        }

        #assitFormControl input[type=checkbox], #assitFormControl input[type=radio] {
            vertical-align: -4px !important;
        }
    </style>
</head>
<body>


<div class="masterTopTitle" style="height: 60px;">
    <div>
        <span>科目管理</span>
    </div>
</div>
<div style="width: 1000px; margin: auto;">
    <div style="margin: auto; height: 30px; width: 1000px; z-index: 3000;" id="utitlyToolBar">
        <div class="buttons" style="float: right; margin-left: 10px; margin-top: 8px;">
            <a class="iconbutton" id="Div2" onclick="injectExcel()"><span class="buttonImport"></span>
                导&nbsp;&nbsp;入</a>
        </div>
        <div class="buttons" style="float: right; margin-left: 10px; margin-top: 8px;">
            <a class="iconbutton" id="Div1" onclick="exportAccountSubject()"><span class="buttonExport">
                </span>导&nbsp;&nbsp;出</a>
        </div>
    </div>
    <div class="FlowContainer" style="width: 1000px;">
        <div id="divMain" class="FlowFirstChild" style="width: 100%;">
            <ul class="nav nav-tabs" id="nav-tabs">
                <#list accountSubjectMap.keySet() as accountSubjectType>
                    <li id="tab-nav-li-${accountSubjectType_index}" class="${(accountSubjectType_index==0)?string('active', '')}">
                        <a>${accountSubjectType}</a>
                    </li>
                </#list>
            </ul>
            <div id="tab-content" class="tab-content" style="width: 1000px; background-color: White; margin-top: 0px;">
                <div style="width: 100%; height: 20px;">
                </div>
                <#list accountSubjectMap.keySet() as accountSubjectType>
                    <div class="tab-pane ${(accountSubjectType_index==0)?string('active', '')}" id="tab-${accountSubjectType_index}">
                        <table class="table table-bordered table-hover table-striped" id="table${accountSubjectType_index}" style="width: 960px; margin-left: 20px;">
                            <thead>
                            <tr>
                                <td>科目编码</td>
                                <td>科目名称</td>
                                <td>助记码</td>
                                <td>余额方向</td>
                                <td>状态</td>
                                <td>操作</td>
                            </tr>
                            </thead>
                            <tbody>
                            <#list accountSubjectMap[accountSubjectType] as accountSubject>
                                <tr id="${accountSubject.subject_id}">
                                    <td style="width: 200px;">${accountSubject.subject_id}</td>
                                    <td style="width: 250px;">${accountSubject.subject_name}</td>
                                    <td style="width: 80px;">${accountSubject.subject_help_code}</td>
                                    <td style="width: 80px; text-align: center;">${accountSubject.subject_direction}</td>
                                    <td style="text-align: center;">${(accountSubject.subject_state==0)?string('不可用','正常')}</td>
                                    <td>
                                        <div class="buttonOption">
                                            <div style="width: 16px; height: 16px; overflow: hidden; float: left;">
                                                <img title="新建" alt="新建" src="${basePath}/page/Image/Common/Common.png"
                                                     style="clip:rect(0px,160px,20px,140px);margin-top:0px;margin-left:-140px;">
                                            </div>
                                        </div>
                                        <div class="buttonOption">
                                            <div style="width:16px;height:16px;overflow:hidden; float:left;">
                                                <img title="编辑" alt="编辑" src="${basePath}/page/Image/Common/Common.png"
                                                     style="clip:rect(0px,180px,20px,160px);margin-top:0px;margin-left:-160px;">
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </#list>
                            </tbody>
                        </table>
                    </div>
                </#list>


                <div style="width: 100%; height: 20px;">
                </div>
                <div id="tableHeader">
                </div>
            </div>
        </div>
        <div id="divEdit" class="FlowChild" style="background-color: #E7E7E7; width: 1000px; position: absolute; left: 1000px; top: 0px;white-space:nowrap;">
            <div style="width: 1000px; background-color: White; min-height: 370px; margin: 00px auto; padding-top: 20px;">
                <table id="tableMain" style="width: 600px; margin: auto; line-height: 38px;">
                    <tbody>
                    <tr>
                        <td colspan="5" class="tdProject" style="height: 30px;">
                            <span id="errorMsg" class="spMustInfo"></span>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 90px;">
                            <span class="spMust">*</span>&nbsp; 科目编码：
                        </td>
                        <td>
                            <div id="asubCodeControl">
                                <span></span>
                                <input type="text" id="edit_subject_id" style="width: 120px;" tabindex="1">
                            </div>
                        </td>
                        <td class="separator">
                        </td>
                        <td>
                            <span class="spMust">*</span>&nbsp;科目名称：
                        </td>
                        <td style="line-height: 20px;">
                            <div class="jqtransform jqtransformdone">
                                <div class="jqTransformInputWrapper" style="width: 187px;">
                                    <div class="jqTransformInputInner">
                                        <div><input type="text" id="edit_subject_name" autocomplete="off" tabindex="2"
                                                    style="width: 177px;" class="jqtranformdone jqTransformInput">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </td>
                        <td>
                            <span id="spIndustry" class="spMustInfo"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <span class="spMust">*</span> &nbsp;上级科目：
                        </td>
                        <td>
                            <div class="jqtransform jqtransformdone">
                                <div class="jqTransformInputWrapper" style="width: 176px;">
                                    <div class="jqTransformInputInner">
                                        <div><input type="text" id="edit_parent_subject_name" tabindex="3"
                                                    style="width: 166px;" class="jqtranformdone jqTransformInput">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <input type="text" id="txtAsubLevel" style="display: none;">
                        </td>
                        <td class="separator">
                        </td>
                        <td>
                            &nbsp;&nbsp;&nbsp;科目类别：
                        </td>
                        <td>
                            <div class="jqtransform jqtransformdone">
                                <span class="select2 select2-container select2-container--default" dir="ltr" style="width: 177px;">
                                    <span class="selection">
                                        <span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="4" aria-labelledby="select2-ddlAsubType-container">
                                            <span class="select2-selection__rendered" id="edit_subject_type" title="资产类">
                                                资产类
                                            </span>
                                            <span class="select2-selection__arrow" role="presentation">
                                                <b role="presentation"></b>
                                            </span>
                                        </span>
                                    </span>
                                    <span class="dropdown-wrapper" aria-hidden="true"></span>
                                </span>
                            </div>
                        </td>
                    </tr>
                    <tr class="trOptions">
                        <td>
                            &nbsp;&nbsp;&nbsp;&nbsp;余额方向：
                        </td>
                        <td>
                            <table class="tbEdit">
                                <tbody>
                                <tr>
                                    <td>
                                        <input type="radio" checked="checked" value="1" id="rdJie" tabindex="5"
                                               name="rdDirection">
                                    </td>
                                    <td>
                                        &nbsp; 借
                                    </td>
                                    <td style="width: 10px;">
                                    </td>
                                    <td>
                                        <input type="radio" id="rdDai" value="2" tabindex="6" name="rdDirection">
                                    </td>
                                    <td>
                                        &nbsp; 贷
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                        <td class="separator">
                        </td>
                        <td>
                            &nbsp;&nbsp;&nbsp;科目状态：
                        </td>
                        <td>
                            <table class="tbEdit">
                                <tbody>
                                <tr id="asubStatusControl">
                                    <td>
                                        <input type="radio" checked="checked" tabindex="7" value="0" id="rdStatus0"
                                               name="rdStatus">
                                    </td>
                                    <td>
                                        &nbsp; 正常
                                    </td>
                                    <td style="width: 10px;">
                                    </td>
                                    <td>
                                        <input type="radio" id="rdStatus1" value="1" tabindex="8" name="rdStatus">
                                    </td>
                                    <td>
                                        &nbsp; 不可用
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5" style="padding-top: 20px;">
                            <table style="padding-bottom: 30px;">
                                <tbody>
                                <tr>
                                    <td id="btnAdd">
                                        <a class="button" tabindex="21" onclick="SubmitAndAdd();return false;">保存并新增</a>
                                    </td>
                                    <td style="width: 20px;" id="Add">
                                    </td>
                                    <td id="btnSave1">
                                        <a class="button" tabindex="19" onclick="SubmitSave(); return false;">保存并返回</a>
                                    </td>
                                    <td id="btnSave2">
                                        <a class="button" tabindex="19"
                                           onclick="SubmitUpdate(); return false;">保&nbsp;&nbsp;存</a>
                                    </td>
                                    <td style="width: 20px;">
                                    </td>
                                    <td>
                                        <a class="button" tabindex="20" onclick="Cancel()">取&nbsp;&nbsp;消</a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <div id="stamp" class="stamp" style="display: none">
                </div>
            </div>
        </div>
    </div>
</div>
<div class="footerSpanHeigth">
</div>

<script src="${basePath}/page/Scripts/jquery/jquery-2.0.3.js"></script>
<script src="${basePath}/page/js/AccountSubject.js"></script>

</body>
</html>